﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using APA_DAO;
using TAM_SPORT;

namespace AMS
{
    public partial class FrmThietBi : Form
    {
        public FrmThietBi()
        {
            InitializeComponent();
        }

        private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            ThietBiDao dao = new ThietBiDao();
            if (dao.insertThietBi(txtTenThietBi.Text, rbGhiChu.Text))
            {
                Result re = new Result("success");
                re.ShowDialog();
                re.Dispose();
            }
            else
            {
                Error err = new Error("error");
                err.ShowDialog();
                err.Dispose();
            }
        }
    }
}
